<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/page/common/public.jspf"%>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>投递项目</title>
<link rel="stylesheet" type="text/css" href="${path}/css/base.css"/>
<link rel="stylesheet" type="text/css" href="${path}/css/layout.css"/>
<script type="text/javascript" src="${path}/js/jquery-1.7.2.min.js"></script>
<style type="text/css">
	.a_upfile {
		width: 100px;
		height: 25px;
		line-height:26px;
		position: relative;
		text-align:center;
		overflow: hidden;
		vertical-align: bottom;
		font-size: 14px;
	    font-weight: 700;
	    padding: 7px;
	    border-radius: 2px;
	    display: inline-block;
	    color: #809de2;
	    border: 1px solid #809de2;
	    background-color: #f2f8ff;
	    margin-left: 5px;
	}
	.a_upfile:hover{color:#5f6ac0;background-color:#d5e8ff}
	
	
	
	.upfile {
		position: absolute;
		right: 0;
		top: 0;
		font-size: 100px;
		opacity: 0;
		filter: alpha(opacity = 0);
	}
</style>
</head>
<body bgcolor="#f9f9f9">
        <!-- head -->
		<c:import url="../include/top.jsp"></c:import>
    	<!--主体-->
    	
    	<div class="wrap f_yh">
        	 <div class="registeredBox" style="margin-top: 0px;border: 1px solid #DFE0E4;border-top-width: 0">
            	<div class="borrow_list_cont f_yh">
       
                    	<form id="projectInfoContacts" action="${path}/project/td.htm" method="POST" enctype="multipart/form-data">
	                    	<iframe name="hidden_importfile" id="hidden_importfile" style="display: none;"></iframe>
	                    	<input type="hidden" name="projectId" value="${project.id}"/>
	                    	<input type="hidden" name="projectname" value="${project.fundname}"/>
	                    	<table cellpadding="0" cellspacing="0" style="width: 100%">
	                    		<tr>
		                            <td colspan="4" class="title_bg"><span></span>投递信息</td>
		                        </tr>
	                    	
		                    	<tr>
		                        	<td class="tAlign_r"><span style="color: red;">*</span>联系人：</td>
		                            <td colspan="3">
		                            	<div class="companyBox_greyBox_text"><input type="text" name="startUserName" value="" /></div>
		                            </td>
		                        </tr>
		                        <tr>
		                        	<td class="tAlign_r"><span style="color: red;">*</span>联系手机：</td>
		                            <td colspan="3">
		                            <div class="registeredBox_greyBox_text"><input type="text"  name="linkmobile"  value="" /></div>
		                            </td>
		                        </tr>
		                        <tr>
		                        	<td class="tAlign_r"><span style="color: red;">*</span>项目标题</td>
		                            <td colspan="3">
		                            <div class="registeredBox_greyBox_text"><input type="text"  name="projectname"  value="" /></div>
		                            </td> 
		                        </tr>
		                        <tr>
		                        	<td class="tAlign_r">项目描述</td>
		                            <td colspan="3">
		                            	<textarea rows="5" cols="60" name="projectdesc"></textarea>
		                            </td> 
		                        </tr>
		                        
		                        <tr>
		                        	<td class="tAlign_r"><span style="color: red;">*</span>商业计划书(上传)：</td>
		                            <td colspan="3">
		                            	<input type="hidden" name="planfilename" id="planfilename">
		                            	<input type="hidden" name="planfilepath" id="planfilepath">
		                            	<span id="showupfile_plan"></span>
		                            	<a href="#" class="a_upfile">
											    点击上传<input class="upfile" type="file" name="plan" id="plan" onchange="importplan()"/>
										</a>
		                            </td> 
		                        </tr>
		                        <tr>
		                        	<td colspan="4" class="tAlign_c">
			                        	<input type="button" onclick="javascript:if(true){void(_submitAction4userInfo(this,'${path}/project/order.htm',{}));return false;}" 
			                        	class="bt_ty s_20" style="width: 20%;padding: 15px"  value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;
			                        	<input type="button" onclick="javascript:void(history.back(-1))" 
			                        	class="bt_ty s_20" style="width: 20%;padding: 15px"   value="返回"/>
		                        	</td>
		                        </tr>
		                    </table> 
	                    </form>
                     </div>
	                    </div>
	                    </div>
                    <div class="clear_both"></div>
    	<!--主体-->
    	<!--foot-->
        <c:import url="../include/foot.jsp"></c:import>
        <!--foot--> 
<script type="text/javascript">
function importplan() {
	$("#projectInfoContacts").attr("action" , "<%=request.getContextPath()%>/project/importplan.htm");
	$("#projectInfoContacts").attr("target","hidden_importfile");
 	$("#projectInfoContacts").submit();
}
function setshow (filename, path,info) {//显示已经上传的文件
	if (info == "success") {
			$("#showupfile_plan").append("<a href='"+path+"' target='_blank'>"+filename+"</a></br>");
			$("#planfilename").val(filename);
			$("#planfilepath").val(path);
	}
	$("#projectInfoContacts").attr("action" , "<%=request.getContextPath()%>/project/td.htm");
	$("#projectInfoContacts").removeAttr("target");
}
function _submitAction4userInfo(obj, action, params) {
	var submitForm;
	while ((obj.parentNode) && (obj.parentNode.tagName)
			&& (!obj.parentNode.tagName.match(/FORM/i))) {
		obj = obj.parentNode;
	}
	submitForm = obj.parentNode;
	if (!submitForm) {
		submitForm = document.createElement("form");
		document.body.appendChild(submitForm);
	}
	submitForm.setAttribute("action", action);
	submitForm.setAttribute("method", "POST");
	for ( var key in params) {
		var hiddenField = document.createElement("input");
		hiddenField.setAttribute("type", "hidden");
		hiddenField.setAttribute("name", key);
		hiddenField.setAttribute("value", params[key]);
		submitForm.appendChild(hiddenField);
	}
	if (submit4userInfo()) {
		submitForm.submit();
	}
		
}
function submit4userInfo() {
	var username = $("input[name='startUserName']").val();
	var linkmobile = $("input[name='linkmobile']").val();
	var projectname = $("input[name='projectname']").val();
	var planfilename = $("input[name='planfilename']").val();
	
	if (username == null || username == "") {
		alert("请输入联系人姓名");
		return false;
	}
	if (linkmobile == null || linkmobile == "") {
		alert("请输入联系手机");
		return false;
	}
	if (projectname == null || projectname == "") {
		alert("请输入项目名称");
		return false;
	}
	if (planfilename == null || planfilename == "") {
		alert("请上传商业计划书");
		return false;
	}
	return true;
}
</script>  
</body>
</html>